import Layout from '../views/layout/Layout'

const _import = require('./_import_' + process.env.NODE_ENV);

export default {
  path: '/box/trans',
  name: 'boxTrans',
  component: Layout,
  meta: { title: '箱起管理', icon: 'icon' },
  children: [
    {
      path: 'activity',
      component: _import('boxtrans/activity/list'),
      name: 'boxTransActivity',
      meta: {
        title: '箱起活动管理',
        buttons: {
          add: { label: '新建', enabled: true },
          edit: { label: '编辑', enabled: true },
          goodsList: { label: '商品管理', enabled: true }
        }
      }
    },
    {
      path: 'boxGiftBag',
      component: _import('boxtrans/boxGiftBag/list'),
      name: 'newBoxGiftBag',
      meta: {
        title: '箱起特权礼包',
        buttons: {
          add: { label: '新建箱起礼包', enabled: true },
          edit: { label: '编辑箱起礼包', enabled: true },
          view: { label: '查看箱起礼包', enabled: true }
        }
      }
    },
    {
      path: 'level',
      component: _import('boxtrans/level/list'),
      name: 'boxTransLevel',
      meta: {
        title: '等级管理',
        buttons: {
          edit: { label: '编辑', enabled: true },
          record: { label: '操作记录', enabled: true }
        }
      }
    },
    {
      path: 'user',
      component: _import('boxtrans/user/list'),
      name: 'boxTransUser',
      meta: {
        title: '箱起用户管理',
        buttons: {
          levelOperateRecord: { label: '等级操作记录', enabled: true },
          integralOperateRecord: { label: '积分操作记录', enabled: true },
          detail: { label: '用户关系查看', enabled: true },
          edit: { label: '修改积分', enabled: true },
          upgrade: { label: '转入升级', enabled: true }
        }
      }
    },
    {
      path: 'goods/:id',
      component: _import('boxtrans/goods/index'),
      name: 'boxTransActivityGoodsList',
      meta: {
        title: '管理箱起商品',
        noCache: true,
        index: '/box/trans/activity'
      },
      props: true,
      hidden: true
    },
    {
      path: 'boxGiftBag/add',
      component: _import('boxtrans/boxGiftBag/edit'),
      name: 'newBoxGiftBagAdd',
      meta: {
        title: '箱起礼包新建',
        index: '/box/trans/boxGiftBag'
      },
      hidden: true
    },
    {
      path: 'boxGiftBag/edit',
      component: _import('boxtrans/boxGiftBag/edit'),
      name: 'newBoxGiftBagEdit',
      meta: {
        title: '箱起礼包编辑',
        noCache: true,
        index: '/box/trans/boxGiftBag'
      },
      hidden: true
    },
    {
      path: 'boxGiftBag/view',
      component: _import('boxtrans/boxGiftBag/edit'),
      name: 'newBoxGiftBagView',
      meta: {
        title: '箱起礼包查看',
        index: '/box/trans/boxGiftBag',
        noCache: true
      },
      hidden: true
    },
    {
      path: 'operate',
      component: _import('boxtrans/level/operate-list'),
      name: 'boxTransLevelRecord',
      meta: {
        title: '操作记录',
        noCache: true,
        index: '/box/trans/level',
        buttons: {
          search: { label: '编辑', enabled: true }
        }
      },
      hidden: true
    },
    {
      path: 'level/:id',
      props: true,
      component: _import('boxtrans/level/edit'),
      name: 'boxTransLevelEdit',
      meta: {
        title: '编辑',
        noCache: true,
        index: '/box/trans/level'
      },
      hidden: true
    },
    {
      path: 'level-operate-record/:boxUserId',
      props: true,
      component: _import('boxtrans/user/level-operate-list'),
      name: 'boxTransUserLevelOperateRecord',
      meta: {
        title: '等级操作记录',
        noCache: true,
        index: '/box/trans/user',
        buttons: {
          search: { label: '编辑', enabled: true }
        }
      },
      hidden: true
    },
    {
      path: 'integral-operate-record/:boxUserId',
      props: true,
      component: _import('boxtrans/user/integral-operate-list'),
      name: 'boxTransUserIntegralOperateRecord',
      meta: {
        title: '积分操作记录',
        noCache: true,
        index: '/box/trans/user',
        buttons: {
          search: { label: '编辑', enabled: true }
        }
      },
      hidden: true
    }
  ]
}
